package com.wanjl.spring_05_mybatis_spring.service.impl;

import com.wanjl.spring_05_mybatis_spring.entity.Person;
import com.wanjl.spring_05_mybatis_spring.mapper.PersonMapper;
import com.wanjl.spring_05_mybatis_spring.service.PersonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

/**
 * @author WanJl
 * @version 1.0
 * @title PersonServiceImpl
 * @description
 * @create 2024/11/1
 */
@Service
public class PersonServiceImpl implements PersonService {
    @Autowired
    private PersonMapper personMapper;
    @Override
    public List<Person> selectAll() {
        List<Person> personList = personMapper.selectAll();
        //xxxxxx service 是我们用来做【业务】逻辑操作的...

        return personList;
    }
}
